diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index f42db40..f67027c 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -19,15 +19,6 @@
 #include <video_font.h>		/* Bitmap font for code page 437 */
 #include <linux/ctype.h>
 
-/*
- * Structure to describe a console color
- */
-struct vid_rgb {
-	u32 r;
-	u32 g;
-	u32 b;
-};
-
 /* By default we scroll by a single line */
 #ifndef CONFIG_CONSOLE_SCROLL_LINES
 #define CONFIG_CONSOLE_SCROLL_LINES 1
@@ -124,61 +115,6 @@
 	}
 }
 
-static const struct vid_rgb colors[VID_COLOR_COUNT] = {
-	{ 0x00, 0x00, 0x00 },  /* black */
-	{ 0xc0, 0x00, 0x00 },  /* red */
-	{ 0x00, 0xc0, 0x00 },  /* green */
-	{ 0xc0, 0x60, 0x00 },  /* brown */
-	{ 0x00, 0x00, 0xc0 },  /* blue */
-	{ 0xc0, 0x00, 0xc0 },  /* magenta */
-	{ 0x00, 0xc0, 0xc0 },  /* cyan */
-	{ 0xc0, 0xc0, 0xc0 },  /* light gray */
-	{ 0x80, 0x80, 0x80 },  /* gray */
-	{ 0xff, 0x00, 0x00 },  /* bright red */
-	{ 0x00, 0xff, 0x00 },  /* bright green */
-	{ 0xff, 0xff, 0x00 },  /* yellow */
-	{ 0x00, 0x00, 0xff },  /* bright blue */
-	{ 0xff, 0x00, 0xff },  /* bright magenta */
-	{ 0x00, 0xff, 0xff },  /* bright cyan */
-	{ 0xff, 0xff, 0xff },  /* white */
-};
-
-u32 vid_console_color(struct video_priv *priv, unsigned int idx)
-{
-	switch (priv->bpix) {
-	case VIDEO_BPP16:
-		if (CONFIG_IS_ENABLED(VIDEO_BPP16)) {
-			return ((colors[idx].r >> 3) << 11) |
-			       ((colors[idx].g >> 2) <<  5) |
-			       ((colors[idx].b >> 3) <<  0);
-		}
-		break;
-	case VIDEO_BPP32:
-		if (CONFIG_IS_ENABLED(VIDEO_BPP32)) {
-			if (priv->format == VIDEO_X2R10G10B10)
-				return (colors[idx].r << 22) |
-				       (colors[idx].g << 12) |
-				       (colors[idx].b <<  2);
-			else
-				return (colors[idx].r << 16) |
-				       (colors[idx].g <<  8) |
-				       (colors[idx].b <<  0);
-		}
-		break;
-	default:
-		break;
-	}
-
-	/*
-	 * For unknown bit arrangements just support
-	 * black and white.
-	 */
-	if (idx)
-		return 0xffffff; /* white */
-
-	return 0x000000; /* black */
-}
-
 static char *parsenum(char *s, int *num)
 {
 	char *end;
@@ -441,28 +377,28 @@
 			case 1:
 				/* bold */
 				vid_priv->fg_col_idx |= 8;
-				vid_priv->colour_fg = vid_console_color(
+				vid_priv->colour_fg = video_index_to_colour(
 						vid_priv, vid_priv->fg_col_idx);
 				break;
 			case 7:
 				/* reverse video */
-				vid_priv->colour_fg = vid_console_color(
+				vid_priv->colour_fg = video_index_to_colour(
 						vid_priv, vid_priv->bg_col_idx);
-				vid_priv->colour_bg = vid_console_color(
+				vid_priv->colour_bg = video_index_to_colour(
 						vid_priv, vid_priv->fg_col_idx);
 				break;
 			case 30 ... 37:
 				/* foreground color */
 				vid_priv->fg_col_idx &= ~7;
 				vid_priv->fg_col_idx |= val - 30;
-				vid_priv->colour_fg = vid_console_color(
+				vid_priv->colour_fg = video_index_to_colour(
 						vid_priv, vid_priv->fg_col_idx);
 				break;
 			case 40 ... 47:
 				/* background color, also mask the bold bit */
 				vid_priv->bg_col_idx &= ~0xf;
 				vid_priv->bg_col_idx |= val - 40;
-				vid_priv->colour_bg = vid_console_color(
+				vid_priv->colour_bg = video_index_to_colour(
 						vid_priv, vid_priv->bg_col_idx);
 				break;
 			default:
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c
index 01e8af5..b258a8a 100644
--- a/drivers/video/video-uclass.c
+++ b/drivers/video/video-uclass.c
@@ -64,6 +64,13 @@
 	ulong video_ptr;
 };
 
+/** struct vid_rgb - Describes a video colour */
+struct vid_rgb {
+	u32 r;
+	u32 g;
+	u32 b;
+};
+
 void video_set_flush_dcache(struct udevice *dev, bool flush)
 {
 	struct video_priv *priv = dev_get_uclass_priv(dev);
@@ -154,6 +161,61 @@
 	return video_sync(dev, false);
 }
 
+static const struct vid_rgb colours[VID_COLOUR_COUNT] = {
+	{ 0x00, 0x00, 0x00 },  /* black */
+	{ 0xc0, 0x00, 0x00 },  /* red */
+	{ 0x00, 0xc0, 0x00 },  /* green */
+	{ 0xc0, 0x60, 0x00 },  /* brown */
+	{ 0x00, 0x00, 0xc0 },  /* blue */
+	{ 0xc0, 0x00, 0xc0 },  /* magenta */
+	{ 0x00, 0xc0, 0xc0 },  /* cyan */
+	{ 0xc0, 0xc0, 0xc0 },  /* light gray */
+	{ 0x80, 0x80, 0x80 },  /* gray */
+	{ 0xff, 0x00, 0x00 },  /* bright red */
+	{ 0x00, 0xff, 0x00 },  /* bright green */
+	{ 0xff, 0xff, 0x00 },  /* yellow */
+	{ 0x00, 0x00, 0xff },  /* bright blue */
+	{ 0xff, 0x00, 0xff },  /* bright magenta */
+	{ 0x00, 0xff, 0xff },  /* bright cyan */
+	{ 0xff, 0xff, 0xff },  /* white */
+};
+
+u32 video_index_to_colour(struct video_priv *priv, unsigned int idx)
+{
+	switch (priv->bpix) {
+	case VIDEO_BPP16:
+		if (CONFIG_IS_ENABLED(VIDEO_BPP16)) {
+			return ((colours[idx].r >> 3) << 11) |
+			       ((colours[idx].g >> 2) <<  5) |
+			       ((colours[idx].b >> 3) <<  0);
+		}
+		break;
+	case VIDEO_BPP32:
+		if (CONFIG_IS_ENABLED(VIDEO_BPP32)) {
+			if (priv->format == VIDEO_X2R10G10B10)
+				return (colours[idx].r << 22) |
+				       (colours[idx].g << 12) |
+				       (colours[idx].b <<  2);
+			else
+				return (colours[idx].r << 16) |
+				       (colours[idx].g <<  8) |
+				       (colours[idx].b <<  0);
+		}
+		break;
+	default:
+		break;
+	}
+
+	/*
+	 * For unknown bit arrangements just support
+	 * black and white.
+	 */
+	if (idx)
+		return 0xffffff; /* white */
+
+	return 0x000000; /* black */
+}
+
 void video_set_default_colors(struct udevice *dev, bool invert)
 {
 	struct video_priv *priv = dev_get_uclass_priv(dev);
@@ -176,8 +238,8 @@
 	}
 	priv->fg_col_idx = fore;
 	priv->bg_col_idx = back;
-	priv->colour_fg = vid_console_color(priv, fore);
-	priv->colour_bg = vid_console_color(priv, back);
+	priv->colour_fg = video_index_to_colour(priv, fore);
+	priv->colour_bg = video_index_to_colour(priv, back);
 }
 
 /* Flush video activity to the caches */
diff --git a/include/video.h b/include/video.h
index 43e2c89..1c30aea7 100644
--- a/include/video.h
+++ b/include/video.h
@@ -131,6 +131,41 @@
 
 #define video_get_ops(dev)        ((struct video_ops *)(dev)->driver->ops)
 
+/** enum colour_idx - the 16 colors supported by consoles */
+enum colour_idx {
+	VID_BLACK = 0,
+	VID_RED,
+	VID_GREEN,
+	VID_BROWN,
+	VID_BLUE,
+	VID_MAGENTA,
+	VID_CYAN,
+	VID_LIGHT_GRAY,
+	VID_GRAY,
+	VID_LIGHT_RED,
+	VID_LIGHT_GREEN,
+	VID_YELLOW,
+	VID_LIGHT_BLUE,
+	VID_LIGHT_MAGENTA,
+	VID_LIGHT_CYAN,
+	VID_WHITE,
+
+	VID_COLOUR_COUNT
+};
+
+/**
+ * video_index_to_colour() - convert a color code to a pixel's internal
+ * representation
+ *
+ * The caller has to guarantee that the color index is less than
+ * VID_COLOR_COUNT.
+ *
+ * @priv	private data of the console device
+ * @idx		color index
+ * Return:	color value
+ */
+u32 video_index_to_colour(struct video_priv *priv, unsigned int idx);
+
 /**
  * video_reserve() - Reserve frame-buffer memory for video devices
  *
diff --git a/include/video_console.h b/include/video_console.h
index 5921767..72edd41 100644
--- a/include/video_console.h
+++ b/include/video_console.h
@@ -15,30 +15,6 @@
 #define VID_TO_PIXEL(x)	((x) / VID_FRAC_DIV)
 #define VID_TO_POS(x)	((x) * VID_FRAC_DIV)
 
-/*
- * The 16 colors supported by the console
- */
-enum color_idx {
-	VID_BLACK = 0,
-	VID_RED,
-	VID_GREEN,
-	VID_BROWN,
-	VID_BLUE,
-	VID_MAGENTA,
-	VID_CYAN,
-	VID_LIGHT_GRAY,
-	VID_GRAY,
-	VID_LIGHT_RED,
-	VID_LIGTH_GREEN,
-	VID_YELLOW,
-	VID_LIGHT_BLUE,
-	VID_LIGHT_MAGENTA,
-	VID_LIGHT_CYAN,
-	VID_WHITE,
-
-	VID_COLOR_COUNT
-};
-
 /**
  * struct vidconsole_priv - uclass-private data about a console device
  *
@@ -243,19 +219,6 @@
 void vidconsole_position_cursor(struct udevice *dev, unsigned col,
 				unsigned row);
 
-/**
- * vid_console_color() - convert a color code to a pixel's internal
- * representation
- *
- * The caller has to guarantee that the color index is less than
- * VID_COLOR_COUNT.
- *
- * @priv	private data of the console device
- * @idx		color index
- * Return:	color value
- */
-u32 vid_console_color(struct video_priv *priv, unsigned int idx);
-
 #ifdef CONFIG_VIDEO_COPY
 /**
  * vidconsole_sync_copy() - Sync back to the copy framebuffer
